<template>
  <div class="wrap title">
    <div class="l">
      <img :src="titleImg" alt="" />
      <h2>{{ titlename }}</h2>
    </div>
    <div class="r">
      <!-- 1->精品推荐 2-> 热门兑换 0->全部 -->
      <span @click="$router.push(`/goods?did=${titlename == '精品推荐'?1:2}`)">更多</span>
      <img src="@/assets/images/arrow.png" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  props: ["titlename", "titleImg"],
};
</script>

<style lang="less" scoped>
.title {
  display: flex;
  justify-content: space-between;
  height: 36px;
  font-family: SourceHanSansSC;
  line-height: 36px;
  margin-bottom: 22px;
  box-sizing: border-box;
  .l {
    width: 169px;
    display: flex;
    justify-content: space-between;
    h2 {
      font-size: 30px;
      font-weight: bold;
      color: #242b39;
    }
  }
  .r {
    width: 51px;
    font-size: 16px;
    font-weight: 300;
    color: #666666;
    cursor: pointer;
  }
}
</style>